import { createContext } from 'react';

interface Config {
  prefix?: string;
}

const defaultConfig: Config = {
  prefix: '',
};
export const ConfigContext = createContext(defaultConfig);

interface TestSrc {
  testImgs?: string[];
}

const defaultSrc: TestSrc = {
  testImgs: [
    'https://pic2.imgdb.cn/item/64494af00d2dde57777da267.png',
    'https://pic2.imgdb.cn/item/644e14910d2dde5777cb8616.png',
    'https://pic2.imgdb.cn/item/644e14dc0d2dde5777cbc28e.png',
    'https://pic2.imgdb.cn/item/644e14910d2dde5777cb85e2.png',
    'https://pic2.imgdb.cn/item/644e14910d2dde5777cb85cf.png',
    'https://pic2.imgdb.cn/item/644e14910d2dde5777cb85fd.png',
    'https://pic2.imgdb.cn/item/644e14dc0d2dde5777cbc214.png',
    'https://pic2.imgdb.cn/item/644e14dc0d2dde5777cbc26e.png',
    'https://pic2.imgdb.cn/item/644e14dd0d2dde5777cbc2b9.png',
    'https://pic2.imgdb.cn/item/644e15580d2dde5777cc2d2f.png',
  ],
};

export const SrcContext = createContext(defaultSrc);

interface NavItem {
  id: number;
  title: string;
  iconName: string;
  nav: string;
};
const defaultNavs: NavItem[] = [
  {
    id: 0,
    title: '首页',
    iconName: 'home',
    nav: '../home/index'
  },
  {
    id: 1,
    title: '在线咨询',
    iconName: 'chat',
    nav: '../chat/index'
  },
  {
    id: 2,
    title: '咨询记录',
    iconName: 'history',
    nav: '../history/index'
  }
]
export const NavContext = createContext(defaultNavs);
